Skip to content

Add Chrome Extension (MV3) auth documentation#87

Open
oriheimlich wants to merge 1 commit intobase44:mainfrom
oriheimlich:add-chrome-extension-auth-docs
Open

Add Chrome Extension (MV3) auth documentation#87
oriheimlich wants to merge 1 commit intobase44:mainfrom
oriheimlich:add-chrome-extension-auth-docs

Conversation

@oriheimlich
Copy link

Summary

  • Adds a Chrome Extension (service worker) row to the environment compatibility table in base44-sdk/references/auth.md
  • Adds a new "Chrome Extension Usage (MV3 Service Worker)" section documenting how to handle OAuth in MV3 service workers where loginWithProvider() and logout() are unavailable (they depend on window.location.href)

What's covered

  • Why loginWithProvider() / logout() throw in service workers
  • Critical requirements: from_url must be the app's Base44 subdomain, site must be deployed first, chrome.tabs.onUpdated for token interception
  • Complete TypeScript code pattern for LOGIN and LOGOUT handlers
  • Note on loginViaEmailPassword as a simpler alternative for extensions

Document how to use Base44 auth in Chrome Extension service workers,
where loginWithProvider() and logout() are unavailable because they
depend on window.location.href internally.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant